Skip to content

[Sync-En] fix: use strict comparisons of returns in openssl_verify examples (#4827) - #1229

Merged
julionc merged 1 commit into
php:masterfrom
lacatoire:sync-en/1215-openssl-strict-comparisons
Sep 2, 2026
Merged

[Sync-En] fix: use strict comparisons of returns in openssl_verify examples (#4827)#1229
julionc merged 1 commit into
php:masterfrom
lacatoire:sync-en/1215-openssl-strict-comparisons

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Fixes #1215

Sync with EN commit 9e5f75b8c1d87da6ee825ae7d1b2a3da218b5c69.

  • Add warnings to openssl_verify(), openssl_x509_verify(), openssl_pkcs7_verify(), openssl_x509_checkpurpose(), ldap_compare(), and ZipArchive::getArchiveFlag() explaining that both the success value and -1 are truthy, so a plain truth test treats an error as a positive result
  • Fix examples in openssl_verify() to use strict comparisons (=== instead of ==)
  • Fix example in openssl_x509_verify() to use strict comparison

@julionc
julionc merged commit 4af70de into php:master Sep 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Sync EN] fix: use strict comparsions of returns in openssl_verify examples (#4827)

2 participants